package com.exchange.controller.app.otc;

import com.exchange.interceptor.BaseValidator;
import com.exchange.interceptor.EnumError;
import com.jfinal.core.Controller;
import com.jfinal.kit.Ret;

public class OTCVaidator extends BaseValidator {
	
	protected void validate(Controller c) {
		setRet(Ret.fail());
    	this.setShortCircuit(true);//短路型验证
    	
    	String url = getActionKey();
    	if (url.equals("/app/otc/apply")) {//nickName, reason
    		validateString("nickName", 3, 20, "msg", EnumError.PARAMETER_ARE_ERROR.getCode());   
    		validateString("reason", 10, 300, "msg", EnumError.PARAMETER_ARE_ERROR.getCode());  
        }
    	//TODO 
    	
    	
	}

}
